package com.github.kezhenxu94.playground.java.miscellaneous;

import java.lang.reflect.Method;

/**
 * Created by com.ikezhenxu.java.study on 12/23/14.
 */
public class ClassStatic {

	public static int Y = A.X + 1;
	// public static Integer Z = A.X + 1;
	// 普通变量类型才能够起作用，初始值为零

	public static void main(Method[] args) {
		System.out.println("X = " + A.X + ", Y = " + ClassStatic.Y + ", Z = ");
	}
}

class A {

	public static int X;

	static {
		X = ClassStatic.Y + 1;
	}
}
